<form nz-form [formGroup]="validateForm" nzLayout="horizontal">
    <nz-form-item>
        <nz-form-label [nzSpan]="6" nzRequired nzFor="roleName">角色名称</nz-form-label>
        <nz-form-control [nzSpan]="16" nzErrorTip="请输入角色名称！">
            <input nz-input name="roleName" formControlName="roleName" placeholder="请输入角色名称" />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label
            [nzSpan]="6"
            nzFor="roleKey"
            nzRequired
            nzTooltipTitle="控制器中定义的权限字符，如：@PreAuthorize(`@ss.hasRole('admin')`)"
        >
            <span>权限字符</span>
        </nz-form-label>
        <nz-form-control [nzSpan]="16" nzErrorTip="请输入权限字符！">
            <input nz-input id="roleKey" formControlName="roleKey" placeholder="请输入权限字符" />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="6" nzRequired nzFor="roleSort">角色顺序</nz-form-label>
        <nz-form-control [nzSpan]="16">
            <nz-input-number name="roleSort" formControlName="roleSort" />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="status">状态</nz-form-label>
        <nz-form-control [nzSpan]="16" nzErrorTip="Please input your nickname!">
            <nz-radio-group name="status" formControlName="status">
                <label *ngFor="let item of statusArray" nz-radio [nzValue]="item.value">{{ item.label }}</label>
            </nz-radio-group>
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="menuIds">菜单权限</nz-form-label>
        <nz-form-control [nzSpan]="16">
            <div style="padding: 4px 0px 8px 0px">
                <label nz-checkbox formControlName="menuNodeAll">全选/全不选</label>
                <label nz-checkbox formControlName="menuCheckStrictly">父子联动</label>
            </div>
            <nz-tree
                #nzTreeComponent
                [nzData]="nodes"
                nzCheckable
                [nzCheckedKeys]="defaultCheckedKeys"
                [nzCheckStrictly]="!defaultCheckStrictly"
                (nzCheckBoxChange)="nzCheck($event)"
                (nzExpandChange)="nzCheck($event)"
                nzVirtualHeight="300px"
            />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="remark">备注</nz-form-label>
        <nz-form-control [nzSpan]="16" nzErrorTip="Please input your nickname!">
            <textarea rows="2" nz-input name="remark" formControlName="remark" placeholder="请输入内容"></textarea>
        </nz-form-control>
    </nz-form-item>
</form>
<div class="modal-footer">
    <button nz-button type="submit" [nzType]="'primary'" (click)="submitForm()" [disabled]="submitDisable" [nzLoading]="loading">
        提交
    </button>
    <button nz-button type="button" (click)="modalRef.destroy()">取消</button>
</div>
